package grpc_client

import (
	"google.golang.org/grpc"
	"google.golang.org/grpc/credentials/insecure"
	pb "takeout/server/proto"
)

var UserClient pb.UserClient

func init() {
	NewUserClient()
}

func NewUserClient() {

	client, err := grpc.NewClient(":50001", grpc.WithTransportCredentials(insecure.NewCredentials()))
	if err != nil {
		return
	}
	UserClient = pb.NewUserClient(client)
}
